﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage1.master" AutoEventWireup="true" CodeFile="dang-bai.aspx.cs" Inherits="dang_bai" Title="Đăng bài viết" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="CSS/news.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    
    .post-button1
    {
        width:88px;
        height:29px;
        background-color:#39a4db;
        border:solid thin #2f8fcd;
        color:#ede8e8;
        margin-right:10px;
        cursor:pointer;
    }
    .post-button1:hover
    {
        background-color:#2993ca;
        color:#ffffff;
        cursor:pointer;
    }    
    .reset-button
    {
         width:88px;
        height:29px;
        background-color:#656565;
        border:solid thin #515152;
        color:#ede8e8;
        cursor:pointer;
    }
    .reset-button
    {
        background-color:#3f3e3e;
        color:#ffffff;
        cursor:pointer;
    }
    .this-wrapper p
    {
        color:#616161;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <div class="clearfix">
        <div id="left-pane">
            <div class="this-wrapper">
    <p>Nhập tiêu đề bài viết</p>
    <asp:TextBox ID="txtPostTitle" TextMode="MultiLine" CssClass="this-big-textbox" runat="server" style="height:40px;width:650px;line-height:40px;"></asp:TextBox><br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Bạn chưa nhập tiêu đề" Display="Dynamic" ControlToValidate="txtPostTitle"></asp:RequiredFieldValidator>
    <p>Nhập mô tả</p>
    <asp:TextBox ID="txtShorcut" runat="server" TextMode="MultiLine" CssClass="this-big-textbox" style="width:650px;height:70px;"></asp:TextBox><br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Bạn chưa nhập mô ta" Display="Dynamic" ControlToValidate="txtShorcut"></asp:RequiredFieldValidator>
    <p>Chọn chủ đề</p>
    <asp:DropDownList ID="ddlPostTopic" runat="server" CssClass="dropdown" style="margin-left:0;margin-bottom:8px;margin-top:8px;line-height:45px;width:657px">
    </asp:DropDownList><br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="ddlPostTopic" ErrorMessage="Bạn chưa chọn chuyên mục" Display="Dynamic"></asp:RequiredFieldValidator>
    <p style="margin-bottom:15px;">Chọn hình đại diện cho bài viết</p>
    <asp:FileUpload ID="FileUpload1" runat="server" size="30" style="margin-bottom:10px;" /><br />
    <asp:Label ID="Label1" runat="server" ></asp:Label>
    <p style="margin-bottom:10px">Nhập nội dung bài viết</p>
    <CKEditor:CKEditorControl ID="CKEditorControl1" runat="server" Width="660"></CKEditor:CKEditorControl><br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Bạn chưa nhập nội dung" Display="Dynamic" ControlToValidate="ddlPostTopic"></asp:RequiredFieldValidator><br />
    <p align="right" style="margin-bottom:20px;width:660px">
        <asp:Button ID="Button1" runat="server" Text="Đăng bài" CssClass="post-button1" 
            onclick="Button1_Click" /><asp:Button
            ID="Button2" runat="server" Text="Nhập lại" CssClass="reset-button" 
            CausesValidation="false" onclick="Button2_Click" />
    </p>
    </div>
        </div>
        <div id="right-pane">
    <div id="hot-news">
        <div id="header-bg">
        <span>Cẩm nang ẩm thực</span>
        </div>
        <div id="hot-news-line"></div>
        <div id="hot-news-content">
                <ul>
                    <asp:Repeater ID="rptTopHotNews" runat="server">
                <ItemTemplate>
                    <li>
                        <div class="clearfix">
                            <div id="hot-news-content_img">
                              <div class='thumbnailList1'><img  alt=""  src='<%# Eval("HinhDaiDien") %>' /></div>
                            </div>
                            <div id="hot-news-content_right-wrapper">
                                <div>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"chi-tiet-tin.aspx?BaiVietID="+Eval("BaiVietID") %>' Text='<%#Eval("TieuDe") %>'></asp:HyperLink>
                                </div>
                                <div style="margin-bottom:0;position:absolute;bottom:0;right:0">
                                    <span style="margin-right:8px;margin-left:5px;font-size:10px"><%#Eval("NgayTao") %></span>
                                <span style="margin-right:8px;font-size:10px">Đăng bởi</span><a class="username" style="font-size:10px" href='<%#"User/thong-tin-thanh-vien.aspx?MaNguoiDung="+Eval("UserID") %>'><%#Eval("TenHienThi")%></a> 
                                </div>
                            </div>
                        </div>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
                </ul>
            
        </div>
    </div>
   <div id="top-poster">
        <div id="top-poster-header"><span>Thành Viên Đăng Bài</span></div>
        <div id="top-post-header-content">
           
            <ul class="clearfix">
                 <asp:Repeater ID="rptTopPoster" runat="server">
                <ItemTemplate>
                    <li>
                        <a href='<%# "User/thong-tin-thanh-vien.aspx?UserID="+Eval("UserID") %>'><img alt="" width="80" height="80" src='<%# Eval("HinhDaiDien") %>' /></a>
                        <a class="displayname" href='<%# "User/thong-tin-thanh-vien.aspx?UserID="+Eval("UserID") %>'><%# Eval("TenHienThi") %></a>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
            </ul>
        </div>
   </div>
   
    <div id="facebook-plugin" style="margin-top:5px;">
        <div class="fb-like-box" data-href="http://www.facebook.com/Phoamthuc.net" data-width="288" data-show-faces="true" data-border-color="#dfdfdf" data-stream="false" data-header="true"></div>
    </div>
</div>
    </div>
    <script type="text/javascript">
        $(".thumbnailList1 img").MyThumbnail({
            thumbWidth: 50,
            thumbHeight: 50,
            imageDivClass: "myPic"
        });
        
    </script>
</asp:Content>

